{extend name="public:base" /}


{block name="css"}
<link rel="stylesheet" type="text/css" href="/static/layui/css/layui.css"/>
<link rel="stylesheet" type="text/css" href="__ADMIN__/css/style.css">{/block}

{block name="content"}

<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox ">
                <div class="ibox-content">
                    <form method="post">
                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">项目名称</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.name}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">活动适用对象</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.applicable_objects}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">项目负责人</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control" value="{$info.head_name} / {$info.head_mobile}" readonly>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="row">
                                <label class="col-sm-1 col-form-label">结束时间</label>
                                <div class="col-lg-6">
                                    <div class="ibox ">
                                        <input type="text" class="form-control" value="{:date('Y-m-d', $info.end_time)}" readonly>
                                    </div>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="row">
                                <label class="col-sm-1 col-form-label">地址</label>
                                <div class="col-lg-6">
                                    <div class="ibox ">
                                        <input type="text" class="form-control" value="{$info.address}" readonly>
                                    </div>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="row">
                                <label class="col-sm-1 col-form-label">简介</label>
                                <div class="col-lg-6">
                                    <div class="ibox ">
                                        <textarea id="editor_id">{$info.content}</textarea>
                                        <textarea data-editor="kindEditor" style="display: none" readonly></textarea>
                                    </div>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="row">
                                <label class="col-sm-1 col-form-label">上下线</label>
                                <div class="col-lg-6">
                                    <div class="ibox ">
                                        <input type="text" class="form-control" value="{$info.is_online == 1 ? '上线' : '下线'}" readonly>
                                    </div>
                                </div>
                            </div>

                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">申报资料</label>
                                <div class="col-sm-3">
                                    <style>
                                        #file-list .box {
                                            display: flex;
                                            align-items: center;
                                        }

                                        #file-list .box a {
                                            margin-bottom: 20px;
                                            width: 200px;
                                        }
                                    </style>
                                    <div id="file-list">
                                        {volist name="info.file_arr" id="vo"}
                                        <div class="box">
                                            <a href="{$vo.path}">{$vo.name}</a>
                                        </div>
                                        {/volist}
                                    </div>
                                    <input type="hidden" class="file_ids" name="file_ids" value="{$info.file_ids}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">岗位</label>
                                <div class="col-sm-10">
                                    <table class="table table-striped">
                                        <thead>
                                        <tr>
                                            <th>岗位</th>
                                            <th>参与人数上限</th>
                                            <th>体验时间</th>
                                            <th>辅导员</th>
                                            <th>操作</th>
                                        </tr>
                                        </thead>
                                        <tbody>
                                        {volist name="post_list" id="vo"}
                                        <tr>
                                            <td>{$vo.name}</td>
                                            <td>{$vo.max_count}</td>
                                            <td>{$vo.time}</td>
                                            <td>{$vo.counsellor_name} {$vo.counsellor_unit}</td>
                                            <td>
                                                <a href="{:url('postJoinList', ['id' => $vo.id])}" class="btn btn-white btn-sm"><i class="iconfont icon-eye"></i> 查看报名学生 </a>
                                            </td>
                                        </tr>
                                        {/volist}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <div class="box-item">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">认证信息</label>
                                <div class="col-sm-3">
                                    <div class="col-sm-12">
                                        <input type="text" class="form-control" value="{$prove_info.company_name}" readonly>
                                    </div>
                                    <br>
                                    <div class="col-sm-12">
                                        <input type="text" class="form-control" value="{$prove_info.username} / {$prove_info.mobile}" readonly>
                                    </div>
                                    <br>
                                    <div class="col-sm-12">
                                        <input type="text" class="form-control" value="{$prove_info.type}" readonly>
                                    </div>
                                    <br>
                                    <div class="form-uploaded-box" style="width: 140px;margin-left: 15px">
                                        {if $prove_info.img}
                                        <div class="form-uploaded-img-box">
                                            <img class="form-uploaded-box-img" src="{:getPicture($prove_info.img)}" data-id="{$info.img}">
                                            <i class="form-uploaded-img-preview iconfont icon-yulan" onclick="previewImg(this, 'form-uploaded-img-preview')"></i>
                                        </div>
                                        {/if}
                                    </div>
                                </div>

                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        {if $info.status == 1 || $info.status == -1}
                        <div class="box-item">
                            <div class="form-group row layui-form">
                                <label class="col-lg-1 col-form-label">审核</label>
                                <div class="col-lg-3">
                                    <input type="radio" lay-filter="status" name="status" value="2" title="审核通过" {$info.status !=-1 ? 'checked' : ''}>
                                    <input type="radio" lay-filter="status" name="status" value="-1" title="审核不通过" {$info.status== -1 ? 'checked' : ''}>
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>
                        {/if}

                        <div class="box-item refuse_box" style="display: none">
                            <div class="form-group row">
                                <label class="col-sm-1 col-form-label">不通过原因</label>
                                <div class="col-sm-3">
                                    <input type="text" class="form-control refuse_reason" name="refuse_reason" value="{$info.refuse_reason}">
                                </div>
                            </div>
                            <div class="hr-line-dashed"></div>
                        </div>

                        <input type="hidden" name="id" value="{$info['id']}">

                        <div class="form-group row">
                            <div class="col-sm-4 col-sm-offset-2">
                                <button type="button" class="btn btn-w-m btn-default back-page">返回</button>
                                {if $info.status == 1}<button type="button" class="btn btn-w-m btn-primary ajax-post">确认审核</button>{/if}
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

{include file="public/cropper-img-mask" cropper_uploaded_img_ids="cropper_uploaded_img_ids" cropper_uploaded_img_paths="cropper_uploaded_img_paths" crop_preview_box="crop-preview-box" /}{include file="public/preview-img-mask" swiper-id="cropper-preview" /}{/block}
{block name='js'}
<script src="__STATIC__/layui/layui.js"></script>
<script type="text/javascript" src="__PLUG__/kindeditor/kindeditor-all.js"></script>
<script>
    <!-- 实例化编辑器 -->
    // initKindEditor('editor_id');
    KindEditor.ready(function (K) {
        window.editor = K.create('#editor_id', {
            readonlyMode: true,
            items: []
        });
    });

    var status  = "{$info.status}";
    if(status == -1) $('.refuse_box').show();

    layui.use(function () {
        var form = layui.form;
        var layer = layui.layer;

        form.on('radio(status)', function (data) {
            var status = data.value;
            if (status == 2) {
                $('.refuse_box').hide();
                $('.refuse_reason').val('');
            } else {
                $('.refuse_box').show();
            }
        })
    })

</script>{/block}
